<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>6_ng-if&ng-disabled&ng-init的结合使用</title>
    <script src="./lib/angularjs.js"></script>
</head>

<body ng-app="myApp" ng-controller="myCtrl" ng-init="view=false">
    <label for="receive"><input id="receive" type="checkbox" ng-model="status">接受协议</label>
    <button ng-click="view=!view">查看协议</button>
    <div ng-if="view">XXX协议内容。</div>
    <div>
        <button ng-disabled="!status">进入下一步</button>
    </div>
</body>

<script>
    const myApp = angular.module("myApp", [])
    myApp.controller("myCtrl", ["$scope", function ($scope) { }])
</script>

</html>